<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>控制器</title>
  </head>
  <body>
    <div ng-app="myApp" ng-controller="myCtrl">
      姓: <input type="text" ng-model="firstName" /><br />
      名: <input type="text" ng-model="lastName" />
      <br />
      姓名：{{ firstName + lastName }}
    </div>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.8/angular.min.js"></script>
    <script>
      var app = angular.module('myApp', [])
      app.controller('myCtrl', function($scope) {
        console.log('TCL: $scope', $scope)
        $scope.firstName = '李'
        $scope.lastName = '雷'
      })
    </script>
  </body>
</html>
